﻿using System;
using Church.Common;

namespace Church.Models.Shared
{
	public class PagerModel
	{
		public int TotalCountItems { get; set; }
		public int PageSize { get; set; }
		public int CountPages { get { return (int)Math.Ceiling(TotalCountItems == 0 ? 1 : TotalCountItems / (double)PageSize); } }
		public int CurrentPage { get; set; }

		public PagerModel()
		{
			PageSize = Constants.DEFAULT_COUNT_PUZZLES;
			CurrentPage = 1;
		}
	}
}